<?php defined('BASEPATH') OR exit('No direct script access allowed');

/**
 * Show RSS feeds in your site
 * 
 * @author  	Phil Sturgeon
 * @author		PyroCMS Dev Team
 * @package		PyroCMS\Core\Widgets
 */
class Widget_Tour extends Widgets
{


	/**
	 * The widget title
	 *
	 * @var array
	 */
	public $title = 'Tour';

	/**
	 * The translations for the widget description
	 *
	 * @var array
	 */
	public $description = array(
		'en' => 'Tour Management Widget');
	
	/**
	 * The author of the widget
	 *
	 * @var string
	 */
	public $author = 'DEV-TOP';

	/**
	 * The author's website.
	 * 
	 * @var string 
	 */
	public $website = 'http://tour-cambodia/';

	/**
	 * The version of the widget
	 *
	 * @var string
	 */
	public $version = '1.0';

	/**
	 * The fields for customizing the options of the widget.
	 *
	 * @var array 
	 */
	

	/**
	 * The main function of the widget.
	 *
	 * @param array $options The options for displaying an HTML widget.
	 * @return array 
	 */
	public function run()
	{
		$this->load->helper('url');
		//$this->load->library("pagination");
		$this->load->model('tour/tour_m');
		/*$config = array();
        $config["base_url"] = base_url().'tour/home';
        $config["total_rows"] = $this->tour_m->tour_count();
        $config["per_page"] = 4;
        $config["uri_segment"] = 3;
        $this->pagination->initialize($config);
        $page = ($this->uri->segment(3)) ? $this->uri->segment(3) : 0;
        $data["links"]=$this->pagination->create_links();*/
		$data['results'] = $this->tour_m->getFourTour();
		$data['package'] = $this->tour_m->get4Packages();
		//$data['results']=$this->tour_m->getAllTour($config["per_page"],$page);
		return $data;
	}
}